<!--
  Generated template for the StockSelectPage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>
  <ion-toolbar color="gm-primary">
    <ion-title>自选</ion-title>

    <ion-buttons left>
      <button ion-button icon-only (click)="onClosed()">
        <ion-icon name="ios-close-circle-outline"></ion-icon>
      </button>
    </ion-buttons>

    <ion-buttons right>
      <button ion-button icon-only (click)="onConfirm()">
        <ion-icon name="checkmark-circle-outline"></ion-icon>
      </button>
    </ion-buttons>
  </ion-toolbar>

  <ion-toolbar color="gm-primary">
    <ion-segment [(ngModel)]="quotation_type" (ionChange)="onSegmentChanged($event)">
      <ion-segment-button value="gjs">
        贵金属
      </ion-segment-button>
      <ion-segment-button value="wh">
        外汇
      </ion-segment-button>
      <ion-segment-button value="gz">
        股指
      </ion-segment-button>
      <ion-segment-button value="yy">
        原油
      </ion-segment-button>
    </ion-segment>
  </ion-toolbar>
</ion-header>

<ion-content>
  <div [ngSwitch]="quotation_type">
    <ion-list *ngSwitchCase="'gjs'">
      <ion-item *ngFor="let data of custom_items[0]">
        <ion-label>{{data.title}}</ion-label>
        <ion-checkbox [(ngModel)]="data.selected"></ion-checkbox>
      </ion-item>
    </ion-list>
    <ion-list *ngSwitchCase="'wh'">
      <ion-item *ngFor="let data of custom_items[1]">
        <ion-label>{{data.title}}</ion-label>
        <ion-checkbox [(ngModel)]="data.selected"></ion-checkbox>
      </ion-item>
    </ion-list>
    <ion-list *ngSwitchCase="'gz'">
      <ion-item *ngFor="let data of custom_items[2]">
        <ion-label>{{data.title}}</ion-label>
        <ion-checkbox [(ngModel)]="data.selected"></ion-checkbox>
      </ion-item>
    </ion-list>
    <ion-list *ngSwitchCase="'yy'">
      <ion-item *ngFor="let data of custom_items[3]">
        <ion-label>{{data.title}}</ion-label>
        <ion-checkbox [(ngModel)]="data.selected"></ion-checkbox>
      </ion-item>
    </ion-list>
  </div>
</ion-content>
